//vue3提供的方法createApp，用来创建应用实例方法
import { createApp } from 'vue'
//引入根组件App
import App from './App.vue'
//引入清除默认样式
import '@/style/reset.scss'

//引入全局组件 顶部和底部
import HospitalTop from '@/components/hospital_top/index.vue'
import HospitalBottom from '@/components/hospital_bottom/index.vue'
import HospitalLogin from '@/components/hospital_login/index.vue'
import Visitor from '@/components/visitor/visitor.vue'
import 'element-plus/theme-chalk/src/message.scss'
// 引入 vue-router核心插件并安装
import router from './router/index'
// 引入element-plus国际化配置
import ElementPlus from 'element-plus'

// 引入pinia仓库
import pinia from "./store/index"
// 引入路由鉴权文件
import './permisstion'

// @ts-ignore
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

//利用createApp方法创建应用实例，且将应用实例挂载到挂载点上
const app = createApp(App);
app.component('HospitalTop',HospitalTop);
app.component('HospitalBottom',HospitalBottom);
app.component('HospitalLogin',HospitalLogin);
// 就诊人全局组件
app.component('Visitor',Visitor)

// 安装element-plus插件
app.use(ElementPlus, {
    locale: zhCn,
  })
//安装vue-router
app.use(router);
// 安装pinia仓库
app.use(pinia);

//挂载
app.mount('#app');
